Minimally invasive diagnostic medical procedures are used to assess the interior surfaces of an organ by inserting a tube into the body. The instruments utilized may have a rigid or flexible tube and provide an image for visual inspection and photography, but also enable taking biopsies and retrieval of foreign objects. Analysis of image data collected during the inspection and imaging of the interior of the body cavity is a critical component of proper diagnosis of disease and other related conditions.
In geometrical optics, a focus, also called an image point, is the point where light rays originating from a point on the object converge. An image, or image point or region, is in focus if light from object points is converged almost as much as possible in the image, and out of focus if light is not well converged. A principal focus or focal point is a special focus. For a lens, or a spherical or parabolic mirror, it is a point onto which collimated light parallel to the axis is focused. The distance in air from the lens or mirror's principal plane to the focus is called the focal length.
When a lens (such as a photographic lens) is set to “infinity”, its rear nodal point is separated from the sensor or film, at the focal plane, by the lens' focal length. Objects far away from the camera then produce sharp images on the sensor or film, which is also at the image plane. Photographers sometimes refer to the image plane as the focal plane; these planes coincide when the object is at infinity, but for closer objects the focal plane is fixed, relative to the lens, and the image plane moves, by the standard optical definitions.
Generally speaking, to render objects in focus, the lens must be adjusted to increase the distance between the rear nodal point and the film, to put the film at the image plane. The focal length f, the distance from the front nodal point to the object to photograph or image S1, and the distance from the rear nodal point to the image plane S2 are then related by:
            1              S        1              +          1              S        2              =      1    f  As S1 is decreased, S2 must be increased. For example, consider a normal lens for a 35 mm camera with a focal length off=50 mm. To focus a distant object (S1≈∞) the rear nodal point of the lens must be located a distance S2=50 mm from the image plane. To focus an object 1 m away (S1=1000 mm), the lens must be moved 2.6 mm further away from the image plane, to S2=52.6 mm.